# Contributor: Bradley J Chambers <brad.chambers@gmail.com>
# Maintainer: Bradley J Chambers <brad.chambers@gmail.com>
pkgname=fgt
pkgver=0.4.6
pkgrel=1
pkgdesc="C++ library for fast Gauss transforms."
url="https://github.com/gadomski/fgt"
arch="all !mips !mips64" # blocked by eigen on mips
license="LGPL-2.0-or-later"
makedepends="cmake eigen-dev"
install=""
subpackages="$pkgname-dev"
source="$pkgname-$pkgver.tar.gz::https://github.com/gadomski/$pkgname/archive/v$pkgver.tar.gz"
builddir="$srcdir/$pkgname-$pkgver"

build() {
        cd "$builddir"

        mkdir build && cd build
        cmake .. \
                -DCMAKE_INSTALL_PREFIX=/usr \
                -DCMAKE_BUILD_TYPE=None \
                -DWITH_TESTS=OFF \
                -DBUILD_SHARED_LIBS=ON \
                -DEIGEN3_INCLUDE_DIR=/usr/include/eigen3
        make
}

package() {
        cd "$builddir"/build
        make DESTDIR="$pkgdir" install
}

sha512sums="b4da61b7c11e2dc526c8cbd81a4ea8a40acc12a3858dfd9b6436fac576d5efc7487c4efe30e29f7ff9c2455a6d89a70da19171bf7ec4206f13e65b2a159061df  fgt-0.4.6.tar.gz"
